# 创建sys
from flask import Blueprint, Flask

from applications.app.course import bp as source_bp
from applications.app.classify import bp as classify_bp
from applications.app.image import bp as image_bp
from applications.app.userInfo import bp as userInfo_bp
from applications.app.challenge import bp as challenge_bp

app_bp = Blueprint('app', __name__, url_prefix='/app')

def register_app_bps(app: Flask):
    # 在admin_bp下注册子蓝图
    app_bp.register_blueprint(source_bp)
    app_bp.register_blueprint(classify_bp)
    app_bp.register_blueprint(image_bp)
    app_bp.register_blueprint(userInfo_bp)
    app_bp.register_blueprint(challenge_bp)

    app.register_blueprint(app_bp)
